<template>
  <component :is="detailVueCompnent" ref="notFlowTodoDetail" :url-params="urlParams" :param-id="urlParams.id" />
</template>
<script>
import { defineAsyncComponent } from 'vue';
const modules = import.meta.glob('@/views/**/*.vue');
export default defineComponent({
  name: 'SysNotFlowTodoDetail',
  data() {
    return {
      urlParams: {},
      detailVueCompnent: shallowRef()
    };
  },
  created() {
    this.urlParams = this.$route.query;
    this.id = this.$route.params.id;
    const url = decodeURIComponent(this.id).replace(RegExp('_', 'g'), '/');
    if (modules[`/src/${url}.vue`]) {
      this.detailVueCompnent = defineAsyncComponent(modules[`/src/${url}.vue`]);
    } else {
      this.detailVueCompnent = defineAsyncComponent(modules[`/src/views/exception/404.vue`]);
    }
  }
});
</script>
